import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from "./store"
import './plugins/vxe-table'
import IconSvg from './components/IconSvg'
import "../node_modules/ag-grid-community/dist/styles/ag-grid.css"
import "../node_modules/ag-grid-community/dist/styles/ag-theme-alpine.css"
import { Col, Row, Field, Form, Button, Cascader, Popup, Divider, Cell, CellGroup, DatetimePicker, Checkbox, CheckboxGroup, RadioGroup, Radio, Calendar, Search } from 'vant'
Vue.use(Col).use(Row).use(Field).use(Form).use(Button).use(Cascader).use(Popup).use(Divider).use(Cell).use(DatetimePicker).use(CellGroup).use(Checkbox).use(CheckboxGroup).use(Radio).use(RadioGroup).use(Calendar).use(Search)
Vue.config.productionTip = false
Vue.component('icon-svg', IconSvg)
/* Vue.prototype.$cordovaPlugins = cordovaPlugins */

Vue.directive("focus", {
  // 当被绑定的元素插入到DOM中时
  update: function (el, binding, vnode, oldVnode) {
    console.log(el);
    console.log(binding);
    console.log(vnode);
    console.log(oldVnode);
    // 聚焦元素
    el.focus();
  },
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
